home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / midi / mdReceive.z / mdReceive
Encoding:
Text File  |  2002-10-03  |  3.7 KB  |  67 lines

  1.  
  2.  
  3.  
  4. mmmmddddRRRReeeecccceeeeiiiivvvveeee((((3333ddddmmmm))))                                                  mmmmddddRRRReeeecccceeeeiiiivvvveeee((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mdReceive - Accept MIDI events from a port
  10.  
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////mmmmiiiiddddiiii....hhhh>>>>
  14.  
  15.      iiiinnnntttt mmmmddddRRRReeeecccceeeeiiiivvvveeee((((MMMMDDDDppppoooorrrrtttt ppppoooorrrrtttt,,,, MMMMDDDDeeeevvvveeeennnntttt ****eeeevvvvbbbbuuuuffff,,,, iiiinnnntttt ccccoooouuuunnnntttt))))
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      mmmmddddRRRReeeecccceeeeiiiivvvveeee reads MIDI events from the MIDI interface associated with _p_o_r_t
  19.      into the _e_v_b_u_f array.  _e_v_b_u_f must be allocated by the user and must
  20.      contain space for _c_o_u_n_t MDevent structures. For most events, the actual
  21.      MIDI event is stored in the _m_s_g array of the MDevent, and the _s_t_a_m_p field
  22.      is set to a stamp value whose format is determined by the port's stamping
  23.      mode (see mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee).
  24.  
  25.      In addition, when a system exclusive event is received, the MIDI library
  26.      allocates a block of memory for the system exclusive data and places a
  27.      pointer to the block of memory in the _s_y_s_e_x_m_s_g field of the event
  28.      structure.  The _m_s_g[_0] byte in the MDevent structure contains a 0xF0
  29.      (MD_SYSEX) to indicate that a system exclusive message has arrived.  The
  30.      _m_s_g_l_e_n field contains a count of the bytes in data buffer.  Long system
  31.      exclusive messages may be decomposed into smaller chunks; the last
  32.      message will have an 0xF7 (EOX) at the end of the _s_y_s_e_x_m_s_g buffer.
  33.  
  34.      The application must release the sysexmsg buffer with mmmmddddFFFFrrrreeeeeeee((((3333ddddmmmm)))) once it
  35.      is finished processing the message.
  36.  
  37.      If no events are available when mdReceive is called, the routine will
  38.      block until one or more events arrive.  The application can avoid
  39.      blocking by calling sssseeeelllleeeecccctttt((((2222)))) on the file descriptor returned by
  40.      mmmmddddGGGGeeeettttFFFFdddd((((3333ddddmmmm)))) before calling mdReceive.  mdReceive returns the number of
  41.      events read.
  42.  
  43.  
  44. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  45.      mdReceive returns the number of messages read from the given port, or -1
  46.      on error.  The following error codes are expected:
  47.  
  48.      ENOMEM   - No memory was available for incoming message storage.
  49.  
  50.      EFAULT   - An invalid address was passed to the MIDI driver
  51.  
  52.      EINVAL   - An undefined operation was called.
  53.  
  54.  
  55. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  56.      mmmmddddIIIInnnnttttrrrroooo((((3333ddddmmmm)))), mmmmddddFFFFrrrreeeeeeee((((3333ddddmmmm)))), mmmmddddSSSSeeeennnndddd((((3333ddddmmmm)))), mmmmvvvvddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm))))
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.